from django.urls import path

from rest_framework import routers
from rest_framework_simplejwt.views import (
    TokenRefreshView, TokenVerifyView
)
from . import views

app_name = "system"

router = routers.DefaultRouter()

router.register('user', views.BaykeUserInfoViewSet, basename='user')
router.register('register', views.BaykeSystemRegisterViewSet, basename='register')
router.register('menu', views.BaykeSystemMenuViewSet, basename='menu')

urlpatterns = [
    path('login/', views.BaykeSystemLoginView.as_view(), name='login'),
    path('token/refresh/', TokenRefreshView.as_view(), name='token_refresh'),
    path('token/verify/', TokenVerifyView.as_view(), name='token_verify'),
    *router.urls,
]